﻿#region << 版 本 注 释 >>

/*----------------------------------------------------------------
* 类 名 称 ：UIPanelInfo
* 类 描 述 ：
* 作    者 ：henrychang
* 创建时间 ：2019/1/6 17:38:13
*******************************************************************
* Copyright @ henrychang 2019. All rights reserved.
*******************************************************************
//----------------------------------------------------------------*/

#endregion << 版 本 注 释 >>

using UnityEngine;

namespace TouchFish.UI
{
    public enum UIPanelState
    {
        None,
        Show,
        Hide,
        Destory,
    }

    public interface IUIPanelInfo
    {
        UIPanelState UIPanelState { get; set; }

        /// <summary>
        /// 对应的资源Id
        /// </summary>
        uint UIResId { get; }

        /// <summary>
        /// ab Name
        /// </summary>
        string AssetBundleName { get; }

        /// <summary>
        /// 面板Name
        /// </summary>
        string PanelName { get; }
    }

    /// <summary>
    /// 面板信息
    /// </summary>
    public class UIPanelInfo : IUIPanelInfo
    {
        /// <summary>
        /// 对应的资源Id
        /// </summary>
        [SerializeField]
        protected uint _uiResId;

        /// <summary>
        /// ab Name
        /// </summary>
        [SerializeField]
        protected string _assetBundleName;

        /// <summary>
        /// 面板Name
        /// </summary>
        [SerializeField]
        protected string _panelName;

        [SerializeField]
        protected UIPanelState _uiPanelState = UIPanelState.None;

        public uint UIResId { get { return _uiResId; } }

        public string AssetBundleName { get { return _assetBundleName; } }

        public string PanelName { get { return _panelName; } }

        public UIPanelState UIPanelState { get { return _uiPanelState; } set { _uiPanelState = value; } }
    }
}